package hashcodeequals;

/**
 * @author cyt
 * @create 2020-06-28 下午 9:52
 */
public class testString {

    public static void main(String[] args) {
        String s1 = new String("123");

        String s2 = "123";

        String s3 = "123";

        System.out.println("s1 hashcode ->" + s1.hashCode());

        System.out.println("s2 hashcode ->" + s2.hashCode());

        System.out.println("s3 hashcode ->" + s3.hashCode());

        System.out.println("s1 == s2 ?  ->" + s1.equals(s2));
    }
}
